package com.micro.Controller;

import io.swagger.annotations.ApiOperation;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class Authtest {

    @ApiOperation(value = "权限测试接口")
    @PreAuthorize("hasAuthority('tset')")
    @GetMapping("/auth")
    public String auth(){
        return "测试成功！";
    }
}
